"use strict";
/**
 * 巨龙jHD23设备专用
 * 提供给julong_jHD23设备相关接口
 */
import Ajax from "../libs/ajax";

const deviceSetting = {
    addDevice(data={}) {
        return Ajax.ajax({
            url: '/api/device/add',
            data,
            method: "post"
        }).then(res => res.data);
    },
    deleteDevice(data={}) {
        return Ajax.ajax({
            url: '/api/device/delete',
            data,
            method: "post"
        }).then(res => res.data);
    },
    getDevices() {
        return Ajax.ajax({
            url: '/api/device/list',
            method: "get"
        }).then(res => res.data);
    },
    updateAlarm(data={}){
        return Ajax.ajax({
            url: '/api/device/update_alarm',
            method: "post",
            data
        }).then(res => res.data);
    },
    updateNet(data={}){
        return Ajax.ajax({
            url: '/api/device/update_net',
            method: "post",
            data
        }).then(res => res.data);
    },
    deleteDevice(data={}) {
        return Ajax.ajax({
            url: '/api/device/delete',
            data,
            method: "post"
        }).then(res => res.data);
    },
    restartDevice(data={}){
        return Ajax.ajax({
            url: '/api/device/restart',
            data,
            method: "post"
        }).then(res => res.data);
    }
}

export default deviceSetting